Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Transactions in Progress
A transaction is a set of related changes to the database that the database either completes in its entirely or discards, leaving no modification to the database. In other contexts this might be referred to as a physical transaction or commit unit. In the most basic case, Progress assures that if you assign multiple field values to a database table, it either applies all of those changes or none of them. But in many cases, you need to update multiple related records in the database with the assurance that all of the changes are made together. For example, you might update an Order, its OrderLines, and the Customer for the Order in a single transaction. In the business logic for that operation you update the Customer Balance to reflect the total of all the OrderLines. You want to know that the adjustment you make to the Customer Balance is always written to the database along with the OrderLine records that are the detail for that adjustment, and that some subset of these changes are never made without the rest of them. If the changes can’t be completed for any reason (whether it is a validation error that your application detects, a database error, a system hardware failure, or anything else), the database needs to make all the changes successfully or back out any partial changes so that the records are restored to their state before the transaction began. Many users need to be able to update the same database concurrently with the same assurance. Progress transactions and the integrity of the OpenEdge database, together with record locking, assure that this is always the case. Your application procedures define the scope of every transaction that updates the database so that you have complete control over the unit of work that is reliably committed or rolled back.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |